package com.zfzs.post.modules.address.service;

import com.zfzs.post.modules.address.domain.SysCity;
import com.zfzs.post.modules.address.service.dto.SysCityDTO;
import com.zfzs.post.modules.address.service.dto.SysCityQueryCriteria;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
* @author ck
* @date 2019-09-09
*/
public interface SysCityService {

    /**
    * queryAll 分页
    * @param criteria
    * @param pageable
    * @return
    */
    Object queryAll(SysCityQueryCriteria criteria, Pageable pageable);

    /**
    * queryAll 不分页
    * @param criteria
    * @return
    */
    Object queryAll(SysCityQueryCriteria criteria);

    /**
     * findById
     * @param id
     * @return
     */
    SysCityDTO findById(Long id);

    /**
     * create
     * @param resources
     * @return
     */
    //@CacheEvict(allEntries = true)
    SysCityDTO create(SysCity resources);

    /**
     * update
     * @param resources
     */
    void update(SysCity resources);

    /**
     * delete
     * @param id
     */
    void delete(Long id);

    /**
     * 查询省数据
     */
    List<SysCity> queryProvinceList();

    /**
     * 查询市 或者 区
     */
    List<SysCity> queryCityOrArea(Long id);
}